import Vue from 'vue'
import Router from 'vue-router'
// import IndexPage from '@/components/pages/IndexPage'
// import ProductListPage from '@/components/pages/ProductListPage'
// import CartPage from '@/components/pages/CartPage'
// import MePage from '@/components/pages/MePage'
// import MyCouponPage from '@/components/pages/MyCouponPage'
// import ProductDetailPage from '@/components/pages/ProductDetailPage'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/index',
      redirect: '/'
    },
    {
      path: '/',
      name: 'Index',
      component: (resolve) => require(['../components/pages/IndexPage.vue'], resolve)
    },
    {
      path: '/productlist',
      name: 'ProductListPage',
      component: (resolve) => require(['../components/pages/ProductListPage.vue'], resolve)
    },
    {
      path: '/cart',
      name: 'CartPage',
      component: (resolve) => require(['../components/pages/CartPage.vue'], resolve)
    },
    {
      path: '/me',
      name: 'MePage',
      component: (resolve) => require(['../components/pages/MePage.vue'], resolve)
    },
    {
      path: '/mycoupon',
      name: 'MyCouponPage',
      component: (resolve) => require(['../components/pages/MyCouponPage.vue'], resolve)
    },
    {
      path: '/productdetail',
      name: 'ProductDetailPage',
      component: (resolve) => require(['../components/pages/ProductDetailPage.vue'], resolve)
    }
  ]
})
